#include "index.h"
#include "ui_index.h"

index::index(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::index)
{
    ui->setupUi(this);
}

index::~index()
{
    delete ui;
}

void index::on_admin_clicked()
{
    QString name=ui->name->text() ;
    QString pwd=ui->phone->text();
    if(pwd=="123456"){
        managerWidget *w=new managerWidget(name);
        w->show();
    }else{
       QMessageBox::warning(this, "警告", "密码错误！");
    }
}


void index::on_customer_clicked()
{
    QString name=ui->name->text();
    QString pwd=ui->phone->text();
    customerWidget *w2=new customerWidget(name,pwd);
    w2->show();
}

